#ifndef DIRECTORY_PARAMS_PANEL_H
#define DIRECTORY_PARAMS_PANEL_H

#include <wx/string.h>
#include <wx/panel.h>

class wxWindow;
class wxButton;
class wxCheckBox;
class wxComboBox;
class wxCommandEvent;
class ThreadSearchFindData;

class DirectoryParamsPanel: public wxPanel {
  public:
    DirectoryParamsPanel( ThreadSearchFindData *findData, wxWindow* parent, int id, const wxPoint& pos = wxDefaultPosition,
                          const wxSize& size = wxDefaultSize, long style = 0 );
    wxString GetSearchDirPath()        const;
    bool     GetSearchDirRecursively() const;
    bool     GetSearchDirHidden()      const;
    wxString GetSearchMask()           const;
    void     SetSearchDirPath( const wxString& sDirPath );
    void     SetSearchDirRecursively( bool bRecurse );
    void     SetSearchDirHidden( bool bSearchHidden );
    void     SetSearchMask( const wxString& sMask );
    void SetSearchHistory( const wxArrayString& searchDirs, const wxArrayString& searchMasks );
    wxArrayString GetSearchDirsHistory() const;
    wxArrayString GetSearchMasksHistory() const;
    void AddExpressionToCombos( const wxString& path, const wxString& mask );
  private:
    void set_properties();
    void do_layout();
  protected:
    wxComboBox* m_pSearchDirPath;
    wxButton* m_pBtnSelectDir;
    wxCheckBox* m_pChkSearchDirRecursively;
    wxCheckBox* m_pChkSearchDirHiddenFiles;
    wxComboBox* m_pMask;
    ThreadSearchFindData *m_pFindData;
    DECLARE_EVENT_TABLE();
  private:
    void OnSearchDirTextEvent( wxCommandEvent &event );
    void OnSearchDirComboChange( wxCommandEvent &event );
    void OnSearchMaskTextEvent( wxCommandEvent &event );
    void OnBtnDirSelectClick( wxCommandEvent &event );
    void OnChkSearchDirRecurse( wxCommandEvent &event );
    void OnChkSearchDirHidden( wxCommandEvent &event );
};

#endif
